BIN=process
CC=gcc
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
LFLAGS=-o
CFLAGS=-c -Wall
RM=rm -f

all: $(BIN)

$(BIN): $(OBJ)
	@$(CC) $(LFLAGS) $@ $^
	@echo "linking ... $^ to $@"

%.o: %.c
	@$(CC) $(CFLAGS) $<
	@echo "compiling ... $< to $@"

.PHONY: clean
clean:
	$(RM) $(BIN) $(OBJ)

